package com.devops.admin.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devops.constant.DevOpsConstant;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: 牛亚杰
 * @Description:
 */
@Data
@Accessors(chain = true)
@TableName("base_user")
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class BaseUser implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private String id;

    @TableField("USER_TYPE")
    private Integer userType;

    @TableField("LOGIN_NAME")
    private String loginName;

    @TableField("REAL_NAME")
    private String realName;

    @TableField("NICK_NAME")
    private String nickName;

    @TableField("PASSWORD")
    private String password;

    @TableField("SEX")
    private Boolean sex;

    @TableField("IMAGE_ID")
    private String imageId;

    @TableField("SUPERMAN")
    private Boolean superman;

    @TableField("PHONE_NUMBER")
    private String phoneNumber;

    @TableField("SIGNATURE")
    private String signature;

    @TableField("EMAIL")
    private String email;

    @TableField("CREAT_USER")
    private String creatUser;

    @TableField("CREAT_DATE")
    private LocalDateTime creatDate;

    @TableField("UPDATE_USER")
    private String updateUser;

    @TableField("UPDATE_DATE")
    private LocalDateTime updateDate;

    @TableField("STATUS")
    @TableLogic(value = DevOpsConstant.DeleteFlag.NOT_DELETE,delval = DevOpsConstant.DeleteFlag.IS_DELETE)
    private Integer status;

    @TableField(exist=false)
    private Boolean checked;

    @TableField("API_TOKEN")
    private String apiToken;

    @TableField("DINGTALK_USER_ID")
    private String dingtalkUserId;
}
